﻿using MediatR;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
using RBAC.api.Application.commond.culture;
using RBAC.api.Application.commond.FarmingInformation;
using RBAC.api.Application.commond.Provincescitiesandcounties;
using RBAC.Common.Domains.RabbitProject;
using RBAC.Common.Dto;
using RBAC.Common.Dto.ProSorce;
using RBAC.Enum;

namespace RBAC.api.Controllers
{
    [Route("api/[controller]/[action]")]
    [ApiController]
    public class FarmingController1 : ControllerBase
    {
        private readonly IMediator _mediator;

        public FarmingController1(IMediator mediator)
        {
            _mediator = mediator;
        }





        /// <summary>
        /// 养殖信息修改+添加
        /// </summary>
        /// <param name="request"></param>
        /// <param name="cancellationToken"></param>
        /// <returns></returns>
        /// 
        [HttpPost]
        public async Task<Rulst> FramUpdate(FarmingUpdateCommond request, CancellationToken cancellationToken)
        {
           
            var query=await _mediator.Send(request);


            return query;

        }

        /// <summary>
        /// 修改我们的的养殖企业信息+添加
        /// </summary>
        /// <param name="request"></param>
        /// <param name="cancellationToken"></param>
        /// <returns></returns>
        /// 
        [HttpPost]
        public async Task<Rulst> firmAdd(FarmingEnterpriseInformationCreateCommond request, CancellationToken cancellationToken)
        {
            var query =await _mediator.Send(request);
            return query;
        }

        /// <summary>
        /// 动检正照片添加
        /// </summary>
        /// <param name="request"></param>
        /// <param name="cancellationToken"></param>
        /// <returns></returns>
        /// 
        [HttpPost]
        public async Task<Rulst> Handleopple(MovementinspectioncertificateImagesCommond request, CancellationToken cancellationToken)
        {

            var query = await _mediator.Send(request);
            return query;
        }
        /// <summary>
        /// 养殖企业照片添加
        /// </summary>
        /// <param name="request"></param>
        /// <param name="cancellationToken"></param>
        /// <returns></returns>
        [HttpPost]
        public async Task<Rulst> FarmHandle(BreedingcompanyphotoCommond request, CancellationToken cancellationToken)
        {
            var query = await _mediator.Send(request);

            return query;
        }


        /// <summary>
        /// 养殖企业列表页面显示
        /// </summary>
        /// <param name="request"></param>
        /// <param name="cancellationToken"></param>
        /// <returns></returns>
        /// 
        [HttpPost]
        public async Task<Rulst> Breedingcompany(BreedingcompanyphotoCreateCommond request, CancellationToken cancellationToken)
        {
            var query = _mediator.Send(request);
            return await query;



        }


        /// <summary>
        /// 保健信息添加
        /// </summary>
        /// <param name="request"></param>
        /// <param name="cancellationToken"></param>
        /// <returns></returns>
        [HttpPost]
        public async Task<Rulst> VaccioneAdd(VaccineCreateCommond request, CancellationToken cancellationToken)
        {


            var query =await _mediator.Send(request);   


            return query;


        }

        /// <summary>
        /// 保健信息删除
        /// </summary>
        /// <param name="request"></param>
        /// <param name="cancellationToken"></param>
        /// <returns></returns>
        [HttpPost]
        public async Task<Rulst> Handle(HealthCareDeelCommond request, CancellationToken cancellationToken)
        {
            var query = await _mediator.Send(request);

            return query;
        }

        



    }
}
